Skip to main content

2.1 - Installing the Library

This chapter will guide you through setting up your development environment and installing the burnysc2 library. Following these steps will ensure you have a clean, isolated, and verifiable setup, which is the professional standard for any software project.

Installation Checklist

  • Task 1: Verify your system meets the project requirements.
  • Task 2: Create an isolated virtual environment for your bot.
  • Task 3: Install the burnysc2 library into that environment.
  • Task 4: Confirm that the installation was successful.

Step 1: System Requirements

Before we install anything, let's ensure your system is ready.

ComponentRequirementWhere to Get ItNotes
PythonVersion 3.10 or newerpython.orgburnysc2 requires modern asynchronous features.

Step 2: The Installation Process

We will install the library in a virtual environment. Think of this as a clean, private workspace for your project, preventing it from interfering with other Python projects on your computer. This is not optional; it is the correct way to manage project dependencies.

The Concept:

Your Computer
|
+-- Global Python (Avoid installing here!)
|
+-- Your_Bot_Project/
|
+-- venv/ (Your project's private, isolated workspace)
|
+-- Python Interpreter
+-- pip
+-- burnysc2 (Library is installed here)

Installation To-Do List:

  1. Create a folder for your project. Open your terminal or command prompt and navigate into it.

    mkdir my-sc2-bot
    cd my-sc2-bot
  2. Create the virtual environment. We will name it venv.

    python -m venv venv
  3. Activate the environment. This tells your terminal to use this private workspace.

    • On Windows:
      .\venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate

    (Your terminal prompt should now show (venv) at the beginning.)

  4. Install burnysc2. Now that your environment is active, use pip to install the library. The --upgrade flag ensures you get the latest version.

    pip install --upgrade burnysc2

Step 3: Verifying Your Installation

Finally, let's verify that the library was installed correctly inside your active environment.

Run the following command:

pip show burnysc2

You should see output that confirms the installation details. This is your proof that everything is ready for the next step.

Example Output:

Name: burnysc2
Version: 7.0.5
Summary: A community-maintained Python library to write StarCraft II bots.
Home-page: https://github.com/BurnySc2/python-sc2
Author: Burny
Author-email: ...
License: MIT
Location: c:\users\yourname\desktop\my-sc2-bot\venv\lib\site-packages
Requires: aiohttp, loguru, portpicker, s2clientprotocol, websockets
Required-by:

If you see this, your installation is complete and correct. You can now move on to setting up the game itself.